package com.xingfly.model;

import javax.persistence.*;

/**
 * 关注我的用户（粉丝）
 * Created by SuperS on 2016/11/29.
 */
@Entity
@Table(name = "xf_follower")
public class Follower extends BaseModel {

    @ManyToOne(targetEntity = User.class,optional = false)
    @JoinColumn(name = "user_id",referencedColumnName = "id")
    private User user;
    @ManyToOne(targetEntity = User.class, optional = false)
    @JoinColumn(name = "follower_user_id",referencedColumnName = "id")
    private User followerUser;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getFollowerUser() {
        return followerUser;
    }

    public void setFollowerUser(User followerUser) {
        this.followerUser = followerUser;
    }
}
